import { lazy } from "react";

// 二级路由
export const homeRoutes = [
    {
        path: "/home/zhineng",
        element: lazy(() => import("@/views/home/Zhineng")),
        title: "智能检测",
    },
    {
        path: "/home/jiuye",
        element: lazy(() => import("@/views/home/Jiuye")),
        title: "就业态势",
    },
    {
        path: "/home/anfang",
        element: lazy(() => import("@/views/home/Anfang")),
        title: "安防管理",
    },
    {
        path: "/home/shebei",
        element: lazy(() => import("@/views/home/Shebei")),
        title: "设备运维",
    }
]

// 配置路由表
let routes = [
    {
        title: "首页",
        path: "/home",
        element: lazy(() => import("@/views/Home")),
        children: homeRoutes
    },
    {
        title: "登录页",
        path: "/login",
        element: lazy(() => import("@/views/Login")),
    },
    {
        title: "错误页",
        path: "*",
        element: lazy(() => import("@/views/Error")),
    },
    // {
    //     title: "3D图",
    //     path: "/ces",
    //     element: lazy(() => import("@/views/Ces")),
    // },
    {
        // 路由重定向
        path: "/",
        to: "/login"
    }
]

export default routes